package abq2.jic.jic.plugin.operate.course;

import kd.bos.form.control.events.ItemClickEvent;
import kd.bos.form.events.BeforeDoOperationEventArgs;
import kd.bos.form.operate.FormOperate;
import kd.bos.form.plugin.AbstractFormPlugin;
import kd.bos.servicehelper.DispatchServiceHelper;
import kd.sdk.plugin.Plugin;

import java.util.EventObject;
import java.util.HashMap;

/**
 * 动态表单插件
 */
public class ShowCourseForm extends AbstractFormPlugin implements Plugin {


    @Override
    public void beforeDoOperation(BeforeDoOperationEventArgs e) {
        super.beforeDoOperation(e);
        String operateKey = ((FormOperate) e.getSource()).getOperateKey();
        if (operateKey.equals("showai")){
            String pageId = this.getView().getMainView().getPageId();
            //GPT任务的id编码
            Object pkValue = Long.parseLong("1964811185912034304");
            DispatchServiceHelper.invokeBizService("ai", "gai", "GaiService","startProcessInSideBar",pkValue,pageId,new HashMap(),"我要查看课表");
        }
    }
}